#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1e5 + 5;

int n, m;
double mx[N << 2];
int sum[N << 2];
int count(double t, int p, int l, int r) {
  if (l == r) return mx[p] > t ? 1 : 0;
  int mid = (l + r) >> 1;
  if (mx[p << 1] <= t)
    return count(t, p << 1 | 1, mid + 1, r);
  else
    return sum[p] - sum[p << 1] + count(t, p << 1, l, mid);
}
void pushup(int p, int l, int r) {
  mx[p] = max(mx[p << 1], mx[p << 1 | 1]);
  int mid = (l + r) >> 1;
  sum[p] = sum[p << 1] + count(mx[p << 1], p << 1 | 1, mid + 1, r);
}
void update(int pos, double val, int p, int l, int r) {
  if (l == r) {
    sum[p] = val > 0.0 ? 1 : 0;
    mx[p] = val;
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid)
    update(pos, val, p << 1, l, mid);
  else
    update(pos, val, p << 1 | 1, mid + 1, r);
  pushup(p, l, r);
}

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  while (m--) {
    int pos;
    double val;
    cin >> pos >> val;
    val /= pos;
    update(pos, val, 1, 1, n);
    cout << sum[1] << endl;
  }
  return 0;
}